Skip to content

fix(cli): a cancelled render does not suggest --docker - #8852

Open
wonjangcloud9 wants to merge 1 commit into
heygen-com:mainfrom
wonjangcloud9:fix/render-cancel-no-docker-hint
Open

wonjangcloud9 wants to merge 1 commit into
heygen-com:mainfrom
wonjangcloud9:fix/render-cancel-no-docker-hint

Conversation

@wonjangcloud9

Copy link
Copy Markdown
Contributor

What

A local render that is cancelled (Ctrl-C, SIGTERM, or the parent process exiting) no longer shows Try --docker for containerized rendering under its error.

Why

I hit this while stopping a long render from a wrapper script. The output was:

✗  Render failed

   render_cancelled
   Try --docker for containerized rendering

Render cancelled: render_cancelled_by_sigterm

The render stopped because I stopped it, and a container can't help with that, so the hint points the reader the wrong way. This is the same kind of misdirection #3370 removed for renders inside the render container, and that #8083 removed for unreadable source files.

Related work

How

  • executeLocalRender passes localRenderFailureHint(cancellation.signal.aborted) as the hint.
  • The new helper returns an empty hint when the render was cancelled or runs inside the container, and the --docker hint otherwise.
  • The container check moves into that helper unchanged, so executeLocalRender gains no branch.
  • The "Render failed" box, the telemetry and the later Render cancelled: … line are unchanged.

Test plan

  • render.test.ts, "does not suggest --docker when the render was cancelled": starts renderLocal, fires the render's SIGTERM listener while the producer waits, and checks that the printed error mentions render_cancelled but not --docker.
    • On main it fails: expected '\n✗ Render failed\n\n render_cance…' not to contain '--docker'.
    • With this change it passes.
  • "still suggests --docker when a render fails on its own": a producer error that isn't a cancellation still prints the hint.
  • npx vitest run src/commands/render.test.ts: 3 tests fail locally both with and without this change, because my workspace dist builds are stale (explicit composition ×2, gif loop). Everything else passes. I left the full run to CI.
  • oxlint, oxfmt --check, comment-ratchet --base origin/main and fallow audit --base origin/main are clean on the two files.

🤖 Generated with Claude Code

Ctrl-C, SIGTERM or a parent that exited printed "Render failed" with
"Try --docker for containerized rendering" under render_cancelled, then
"Render cancelled: render_cancelled_by_sigterm". Nothing about a
cancelled render is fixed by a container, so the hint is now empty when
the cancellation signal has aborted, as it already was inside the
render container.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant